Skip to content

Compare benchmarks to some goplayground validator benchmarks#6

Open
awalterschulze wants to merge 3 commits intomasterfrom
goplayground-validator
Open

Compare benchmarks to some goplayground validator benchmarks#6
awalterschulze wants to merge 3 commits intomasterfrom
goplayground-validator

Conversation

@awalterschulze
Copy link
Copy Markdown
Member

@awalterschulze awalterschulze commented Aug 15, 2017

Katydid benchmarks ran with

MacBook Pro (Retina, 15-inch, Mid 2015)
Processor: 2.8 GHz Intel Core i7
16 GB 1600 MHz DDR3
go version go1.8 darwin/amd64

Govalidator benchmarks ran with

Dell XPS 15 i7-7700HQ 32GB Go version go1.8.3 linux/amd64

GoValidator
BenchmarkStructLevelValidationSuccess 219 ns/op
BenchmarkStructSimpleSuccess 263 ns/op
BenchmarkStructComplexSuccess 1504 ns/op
BenchmarkStructComplexFailure 7585 ns/op

Katydid Relapse
BenchmarkStructLevelValidationSuccess 132 ns/op
BenchmarkStructSimpleSuccess 155 ns/op
BenchmarkStructComplexSuccess 444 ns/op
BenchmarkStructComplexFailure 414 ns/op

Optimized Katydid Relapse
BenchmarkStructComplexSuccess 132 ns/op
BenchmarkStructComplexFailure 129 ns/op

Disclaimer: I did take some shortcuts on BenchmarkStructComplexSuccess and BenchmarkStructComplexFailure by not including the last two fields.

@awalterschulze
Copy link
Copy Markdown
Member Author

Maybe its plausible to convert govalidator structs with their tags into relapse expressions to still have the ease of use of structs tags and the speed of relapse.

The reflect parser is a proof of concept at the moment and will need to be matured, but this will be easy and happen naturally given all the test cases from govalidator.

@yaronsumel
Copy link
Copy Markdown

Yo that would be awesome if we can tags and that speed !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants